import VueRouter from 'vue-router';
//导入对应的路由组件
import homecontainer from './components/tabbar/homecontainer.vue'
import huicontainer from './components/tabbar/huicontainer.vue'
import searchcontainer from './components/tabbar/searchcontainer.vue'
import shoppingcarcontainer from './components/tabbar/shoppingcarcontainer.vue'
import news from './components/news/newlist.vue'
import newinfo from './components/news/newinfo.vue'
import photo from './components/photo/photo.vue'
import photolist from './components/photo/photolist.vue'
// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    {path:'/', redirect:'/home'},
    {path:'/home', component:homecontainer},
    {path:'/hui', component:huicontainer},
    {path:'/shoppingcar', component:shoppingcarcontainer},
    {path:'/search', component:searchcontainer},
    {path:'/home/new', component:news},
    {path:'/home/new/newinfo/:id',component:newinfo},
    {path:'/home/photo',component:photo},
    {path:'/home/photolist/:id',component:photolist}
  ],
  linkActiveClass:'mui-active'
})

// 把路由对象暴露出去
export default router